/**
 * @公司:公约树
 * @位置:苏州
 * @Classname Binding
 * @Date 2022-06-03 下午 10:31
 * @Created by hanWanLu
 * @auther 中文:韩万路
 */


package com.animeJava.mode;

import com.animeJava.dao.BiningDao;

public class PropertyModel<T>{
    private T data;
    private BiningDao biningDao;
    public PropertyModel(T data) {
        this.data = data;
    }

    public void event(BiningDao biningDao){
        this.biningDao = biningDao;
    }

    public T getData() {
        if(biningDao != null)biningDao.run(data);
        return data;
    }

    public void setData(T data) {
        this.data = data;
        if(biningDao != null)biningDao.run(data);
    }
}
